﻿using System;
using Framework;

namespace Enterprise.Admin.Handle.BusinessCard
{
    public partial class GetDetailJson : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var id = Fq("id").SafeToInt();
            var businessCardService = new BusinessCardService();
            var row = businessCardService.GetById(id);
            object result = new
                                        {
                                            CoBusinessCardId = row["CoBusinessCardId"].SafeToInt(),
                                            CoBusinessCardCategoryId = row["CoBusinessCardCategoryId"].SafeToString(),
                                            CoName = row["CoName"].SafeToString(),
                                            CoNameEn = row["CoNameEn"].SafeToString(),
                                            CoDescription = row["CoDescription"].SafeToString(),
                                            CoDescriptionEn = row["CoDescriptionEn"].SafeToString(),
                                            CoNormalImage = row["CoNormalImage"].SafeToString(),
                                            CoSmallImage = row["CoSmallImage"].SafeToString(),
                                            CoBigImage = row["CoBigImage"].SafeToString(),
                                            CoSort = row["CoSort"].SafeToInt()
                                        };
            Json(result);
        }
    }
}